package com.itheima.pool;

import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

public class Demo02 {

    public static void main(String[] args) {
        ExecutorService pool = Executors.newFixedThreadPool(3);
        for (int i=0;i<10;i++) {
            pool.submit(()->{
                String name = Thread.currentThread().getName();
                System.out.println(name);
            });
        }


    }
}
